<div [ngClass]="{true:'nocontent',false:'content'}[items.length > 0]">
    <ng-container *ngIf="items.length > 0 else nodata">
        <div *ngFor="let item of items" class="dataclass">
            <div>
                <span>项目名称：</span>
                <input type="text" [value]="item.projectName" readonly>
            </div>
            <div>
                <span>项目编号：</span>
                <input type="text" [value]="item.projectNo" readonly>
            </div>
            <div>
                <span>合同名称：</span>
                <input type="text" [value]="item.contractName" readonly>
            </div>
            <div>
                <span>合同编号：</span>
                <input type="text" [value]="item.contractNo" readonly>
            </div>
            <div>
                <span>合同类型：</span>
                <input type="text" [value]="item.contractType" readonly>
            </div>
        </div>
    </ng-container>
</div>

<ng-template #nodata>
    <div class="nodataclass">
        <img src="assets/nodata.jpg">
    </div>
</ng-template>